package com.feihao.zhou.demo01;

public class ThreadStateDemo {
    public static void main(String[] args) throws InterruptedException {
        //定义一个内部线程
        Thread thread = new Thread(() -> {
            System.out.println("2.执行thread.start()之后，线程的状态：" +
                    Thread.currentThread().getState());

            try {
                Thread.sleep(200);


            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        });
        System.out.println(thread.getState());

        thread.start();
        Thread.sleep(50);
        System.out.println("计时休眠时"+thread.getState());

        Thread.sleep(2000);

        System.out.println("最后"+thread.getState());


    }
}
